
<?php echo $this->
	Html->script(array( 'print' )); ?>
	<div class="grid12">
    <div id="areaImprimir">
		<div class="widget">
			
				<div class="whead">
					<h6>
						DETALLE FACTURAS DE &nbsp;&nbsp;&nbsp;<?php echo $fecha1; ?>&nbsp;&nbsp;&nbsp; A &nbsp;&nbsp;&nbsp; <?php echo $fecha2 ?>
					</h6>
					<div class="clear"></div>
				</div>
				<table cellpadding="0" cellspacing="0" width="100%" class="tDefault">
					<thead>
                    <tr>
						<td>
							Item
						</td>
						<td>
							C&oacute;digo
						</td>
						<td>
							Tipo factura
						</td>
						<td>
							Grupo Factura
						</td>
						<td>
							Caja Archivo
						</td>
						<td>
							Fecha inicial
						</td>
						<td>
							Fecha final
						</td>
      </tr>
					</thead>
					<tbody>
						<?php $i=1; ?>
							<?php foreach ($consulta as $c): ?>
								<tr>
									<td>
										<?php echo $i; $i++; ?>
									</td>
									<td>
										<?php echo $c[ 'Factura'][ 'codigo'] ?>
									</td>
									<td>
										<?php echo $c[ 'Factura'][ 'tipo'] ?>
									</td>
									<td>
										<?php echo $c[ 'Factura'][ 'grupo'] ?>
									</td>
									<td>
										<?php echo $c[ 'Factura'][ 'caja'] ?>
									</td>
									<td>
										<?php echo $c[ 'Factura'][ 'fecha1'] ?>
									</td>
									<td>
										<?php echo $c[ 'Factura'][ 'fecha2'] ?>
									</td>
								</tr>
								<?php endforeach; ?>
					</tbody>
				</table>
			</div>
		</div>
	</div>
	<div class="actions-right">
		<?php echo $this->
			Html->link("Volver &raquo;", array('controller'=>'Publicos', 'action'=>'generales'), array('class'=>'buttonS bLightBlue', 'escape' => FALSE)); ?>
	</div>
	<p>
	</p>
	<input type="button" class="buttonS bGreen" value="Imprimir" id="btnImprimir" />
	<script type="text/javascript">
		
   $(document).ready(function() {

         $("#btnImprimir").click(function() {
            //console.log('click');
             printElem({ leaveOpen: true, printMode: 'popup' });
             //printElem({ overrideElementCSS: ['http://www.epcm.com/css/printable.css'] });
         });


     });
 function printElem(options){
     $('#areaImprimir').printElement(options);
 }

 
	</script>